package com.sebastian.studies.ch9_BMI;

public class BMI {

	private String name;
	private int age;
	private double weight;
	private double height;

	public BMI(String name, int age, double weight, double height) {
		super();
		this.name = name;
		this.age = age;
		this.weight = weight;
		this.height = height;
	}

	public BMI(String name, double weight, double height) {
		super();
		this.name = name;
		this.weight = weight;
		this.height = height;
	}

	public String getName() {
		return name;
	}
	public int getAge() {
		return age;
	}
	public double getWeight() {
		return weight;
	}
	public double getHeight() {
		return height;
	}

	public double getBMI() {
		double bmi = weight / (height * height);
		return Math.round(bmi*100)/100.0;
	}

	public String getStatus() {
		double bmi = getBMI();

		if (bmi < 1) {
			return "Option 1";
		} else if (bmi < 2) {
			return "Option 2";
		} else if (bmi < 3) {
			return "Option 3";
		} else {
			return "Option 4";
		}
		
	}

	@Override
	public String toString() {
		
		return super.toString();
	}
}
